{include file="admin/includes/header.tpl"}

<h1>{$binding->name}</h1>
{print_q}
<p>{icon id='add'}<a href="{#AdminRoot#}{#CRUDPage#}?i={$binding->map_id}&mode=add">New Entry</a></p>

<table id="rows">
  <thead>
    <tr>
      {foreach from=$cols item=colname}
        <th>{$colname}</th>
      {/foreach}
      <th colspan="2" width="140">Actions</th>
    </tr>
  </thead>
  
  <tbody>
    {foreach from=$rows item=row key=k}{if ($k % 2)==1}{assign var='class' value=" class=\"ALT\""}{else}{assign var='class' value=""}{/if}
    <tr{$class}>
      {foreach from=$cols item=colname}
      <td>{$row->$colname|truncate:64:"..."}</td>
      {/foreach}
      <td>{icon id='pencil'}<a href="{#AdminRoot#}{#CRUDPage#}?i={$binding->map_id}&r={$row->id}&mode=edit">Edit</a></td>
      <td>{icon id='delete'}<a href="{#AdminRoot#}{#CRUDPage#}?i={$binding->map_id}&r={$row->id}&mode=remove">Remove</a></td>
    </tr>
    {/foreach}
  </tbody>
  
  <tfoot><tr><td colspan="7">&nbsp;</td></tr></tfoot>
</table>


{include file="admin/includes/footer.tpl"}